<?php

class MyString 
{
    function __construct()
    {
    }

    public static function startWith($string, $search)
    {
        $piece = substr($string, 0, strlen($search));
        if ($piece == $search) {
            return(true);
        } else {
            return(false);
        }
    }

    public static function removeLast($string, $len = 1)
    {
        $value = substr($string, 0, strlen($string) - $len);
        return($value);
    }

    public static function removeFirst($string, $len = 1)
    {
        return(substr($string, $len));
    }
}
?>    
